package com.example.nio.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/api/securityTest")
@RestController
public class SecurityTestController {
    @RequestMapping("/hello")
    @PreAuthorize("hasRole('ROLE_ADMIN1')")
    public String hello(){
        return "helloWorld";
    }

}
